﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace Main.Packets
{
    public class AcknowledgementPacket : Packet
    {
        public AcknowledgementPacket(byte numeroConnexion, PacketType type)
            : base(numeroConnexion, type)
        {

        }

        public static AcknowledgementPacket CreateAcknowledgementPacket(string str)
        {
            return JsonConvert.DeserializeObject<AcknowledgementPacket>(str) as AcknowledgementPacket;
        }

        public override void WriteJson(System.IO.StreamWriter sw)
        {
            sw.WriteLine(JsonConvert.SerializeObject(this));
        }
    }
}
